﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Cadastro.aspx.cs" Inherits="VemTransporte.Views.UsuarioTransporte.Cadastro" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>..:: STI ::..</title>
    <link href="../../Content/Estilo/stylo.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />

</head>
<body id="corpo">
    <form id="form1" runat="server">
    <!-- Div Topo Inicio -->
    <div id="topo">
        <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/Default.aspx">
        <div id="logoTopo"></div>
        </asp:HyperLink>
    </div>
    <br />
    <center>
    <label style="font-size: 24px; color:#203360; font-weight:bold;">
        Criação de Nova Conta
    </label>
    <br />
    <label style="font-size: 11px; font-family:Verdana; color:#203360;">
        Use o formulário abaixo para criar sua nova conta de acesso.
        <br />
        Senha é requerido o minimo de
            <%= Membership.MinRequiredPasswordLength %> caracteres.
    </label>
        <span class="failureNotification">
            <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
        </span>
        <br />
        <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification"
            ValidationGroup="RegisterUserValidationGroup" />
        <fieldset style="width:410px; height:300px;">
            <legend style="font-size: 14px; font-weight:bold; font-family:Verdana; color:#203360;">
                Informações da conta
            </legend>

            <table style="float:left">
            <tr>
                <td>
                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" 
                    style="font-size: 11px; font-family:Verdana; color:#203360;">Nome do usuário:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="UserName" runat="server" CssClass="textEntry" Height="30px" BorderColor="#9aafca" 
                                Width="340px" Font-Size="14px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                        CssClass="failureNotification" ErrorMessage="Preencha o campo Nome!" ToolTip="Preencha o nome do usuário  requerido!"
                        ValidationGroup="RegisterUserValidationGroup" ForeColor="Red">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label9" runat="server" AssociatedControlID="DropDownListSexo" 
                    style="font-size: 11px; font-family:Verdana; color:#203360;">Sexo:</asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListSexo" runat="server" Height="30px" BorderColor="#9aafca" 
                                Width="340px" Font-Size="14px">
                        <asp:ListItem><-- Selecione --></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="DropDownListSexo" CssClass="field-validation-error" 
                        ErrorMessage="Sexo é requerido!">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" AssociatedControlID="DropDownListDia" Font-Names="verdana"
                    Font-Size="12px" ForeColor="#203360">DT Nascimento:</asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListDia" runat="server" Height="33px" 
                        Width="49px" BorderColor="#9aafca">
                        <asp:ListItem>Dia</asp:ListItem>
                    </asp:DropDownList>

                    <asp:Label ID="Label2" runat="server" Text=" / "></asp:Label>
                    <asp:DropDownList ID="DropDownListMes" runat="server" Height="30px" 
                        Width="168px" BorderColor="#9aafca">
                        <asp:ListItem>Mês</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label3" runat="server" Text=" / "></asp:Label>
                    <asp:DropDownList ID="DropDownListAno" runat="server" Height="30px" 
                        Width="97px" BorderColor="#9aafca">
                        <asp:ListItem>Ano</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" 
                    style="font-size: 11px; font-family:Verdana; color:#203360;">E-mail:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Email" runat="server" CssClass="textEntry" Height="30px" BorderColor="#9aafca" 
                                Width="340px" Font-Size="14px"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="Email" CssClass="field-validation-error" 
                        ErrorMessage="E-mail está inválido!" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" 
                    style="font-size: 11px; font-family:Verdana; color:#203360;">Senha:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password" 
                    Height="30px" BorderColor="#9aafca" Width="340px" Font-Size="14px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                        CssClass="failureNotification" ErrorMessage="Preencha o campo Senha!" ToolTip="Senha é requerida."
                        ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword" 
                    style="font-size: 11px; font-family:Verdana; color:#203360;">Confirmar senha:</asp:Label>
                </td>
                <td>
                     <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"
                     Height="30px" BorderColor="#9aafca" Width="340px" Font-Size="14px"></asp:TextBox>
                    <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification"
                        Display="Dynamic" ErrorMessage="Preencha o campo Confirm Password!" ID="ConfirmPasswordRequired"
                        runat="server" ToolTip="Confirm Password is required." 
                        ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                        ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic"
                        ErrorMessage="A senha digitada não é igual da confirmação de senha!" 
                        ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <p class="submitButton">
                        <asp:Button ID="CreateUserButton" runat="server" Text="Criar conta" BackColor="#6ea954" BorderColor="#6ea954"
                        ValidationGroup="RegisterUserValidationGroup" OnClick="CreateUserButton_Click" 
                        style="height:26px; float:right;" ForeColor="White" Height="30px" Width="100px" />
                    </p>
                </td>
            </tr>
            </table>
        </fieldset>
    </center>

              <%--  <script > 
                          function mascara_data(data){ 
                              var mydata = ''; 
                              mydata = mydata + data; 
                              if (mydata.length == 2){ 
                                  mydata = mydata + '/'; 
                                  document.forms[0].data.value = mydata; 
                              } 
                              if (mydata.length == 5){ 
                                  mydata = mydata + '/'; 
                                  document.forms[0].data.value = mydata; 
                              } 
                              if (mydata.length == 10){ 
                                  verifica_data(); 
                              } 
                          } 
           
                          function verifica_data () {

                            DropDownListDia = (document.forms[0].data.value.substring(0, 2));
                            DropDownListMes = (document.forms[0].data.value.substring(3, 5));
                            DropDownListAno = (document.forms[0].data.value.substring(6, 10)); 

                            situacao = ""; 
                            // verifica o dia valido para cada mes 
                            if ((DropDownListDia < 01) || (DropDownListDia < 01 || DropDownListDia > 30) && (DropDownListMes == 04 || DropDownListMes == 06 || DropDownListMes == 09 || DropDownListMes == 11) || DropDownListDia > 31) { 
                                situacao = "falsa"; 
                            } 

                            // verifica se o mes e valido 
                            if (DropDownListMes < 01 || DropDownListMes > 12) { 
                                situacao = "falsa"; 
                            } 

                            // verifica se e ano bissexto 
                            if (DropDownListMes == 2 && (DropDownListDia < 01 || DropDownListDia > 29 || (DropDownListDia > 28 && (parseInt(DropDownListAno / 4) != DropDownListAno / 4)))) { 
                                situacao = "falsa"; 
                            } 
    
                            if (document.forms[0].data.value == "") { 
                                situacao = "falsa"; 
                            } 
    
                            if (situacao == "falsa") { 
                                alert("Data inválida!"); 
                                document.forms[0].data.focus(); 
                            } 
                          } 
          </script>--%>


        </div>
    </form>
</body>
</html>
